package crafex.engine.entities;

import crafex.engine.tools.FloatVertex2D;

/**
 * the in world entity for the item
 */
public class Item extends Entity{
	
	/**the command used when picked up*/
	private String command;
	/**the item to be put in the inventory*/
	private InventoryItem item;
	
	public Item(FloatVertex2D initCoordinates){
		setCoordinates(initCoordinates);
		//TODO add do nothing command here
	}
	
	public Item(FloatVertex2D initCoordinates, String command){
		setCoordinates(initCoordinates);
		setCommand(command);
	}
	
	public Item(FloatVertex2D initCoordinates, String command, InventoryItem item){
		setCoordinates(initCoordinates);
		setCommand(command);
		setItem(item);
	}
	
	/**
	 * gets the held item
	 * @return item
	 */
	public InventoryItem getItem() {
		return item;
	}

	/**
	 * sets the held item
	 * @param item
	 */
	public void setItem(InventoryItem item) {
		this.item = item;
	}
	
	/**
	 * sets the command to use apon collection
	 * @param command
	 */
	private void setCommand(String command){
		this.command = command;
	}
	
	/**
	 * gets the command to use apon collection
	 * @return command
	 */
	public String getCommand(){
		return this.command;
	}
}